<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
    <base />
    <title>
      搜索{$catname} 最新电影电视剧下载，迅雷电影电视剧下载，高清电影电视剧
    </title>
    <meta name="keywords" content="2015最新综艺片下载，迅雷综艺片下载，高清综艺片" />
    <meta name="description" content="迅播影院为广大综艺片爱好者提供精选综艺片迅雷高速下载,本站支持迅雷看看综艺片点播以及最新的百度影音播放。"
    />
    <link href="http://statics.joy3g.com/2tu/css/style.css?v201406" type="text/css"
    rel="stylesheet">
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    <script src="http://cdn.bootcss.com/jquery/2.2.1/jquery.min.js"></script>
    <script>
      var sitePath = ''
    </script>
    <script type="text/javascript" src="http://statics.joy3g.com/2tu/static/js/jquery-1.7.1.min.js?v201406">
    </script>
    <script type="text/javascript" src="http://statics.joy3g.com/2tu/static/js/common.js?v201406">
    </script>
    <script type="text/javascript" src="http://statics.joy3g.com/2tu/common.js?v201406"></script>
    <script type="text/javascript" src="/public/js/ajax.js"></script>
  </head>
  
  <body class="channel8">
    <!-- 头部 -->
    <?php require('./public/head.html') ?>
    <!--/header-->

<!-- 内容 -->
    <div id="main">

      <!-- 左侧栏目 -->
      <div class="pside">
        <ul>
          <div class="title">
            分类检索
          </div>

          <?php foreach ($catall as $cat) { ?>

          <li class="smenu7">
            <a href="<?php echo U('home/cat/search/cat/'.$cat['cat_id']) ?>">{$cat.catname}</a>
          </li>

          <?php } ?>

        </ul>
      </div>
      <!-- end左侧栏目 -->

      <div class="pagelist">
        <!-- 筛选开始 -->
        <div class="filter">

          <!-- 筛选类型 -->
          <div class="title">
            <b>
              {$catname}&nbsp分类筛选
            </b>
          </div>
          <!-- end筛选类型 -->

          <!-- 引入过滤 -->
          <ul>


          <!-- 栏目 -->
          <li id="cat">
          <span>分类:</span>
          <a href="<?php echo U('home/cat/search'); ?>"  >全部</a>
          
          <?php foreach ($catall as $cat) { ?>
          <a href="<?php echo U('home/cat/search/cat/'.$cat['cat_id']); ?>">{$cat.catname}</a>
          <?php } ?>

          </li>

<style>
  #ahover{
    background-color: #BEBEBE;
    color: white;
  }

</style>
          <script>
          //控制栏目背景色
          var nav = $('#main a');
          var type = "<?php echo $catname; ?>";
          for (var i = 0; i < nav.length; i++) {
            var a = nav[i];
            if (a.innerHTML == type) {
              $(a).attr('id','ahover');
            }; 
          };
          </script>


        <li id="type">
          <span>类型:</span>
          <a href="" id="ahover" >全部</a>
          <!-- 类型循环 -->
          <?php foreach ($typeall as $type) { ?>
          <a href="<?php  ?>">{$type.type}</a>
          <?php } ?>

        </li>

        <!-- 地区 -->
        <li id="region">
          <span>地区:</span>
          <a href="" id="ahover">全部</a>
          <a href="">大陆</a>
          <a href="">香港</a>
          <a href="">台湾</a>
          <a href="">日本</a>
          <a href="">韩国</a>
          <a href="">欧美</a>
          <a href="">其它</a>
        </li>
        <!-- end地区 -->

        <li id="year">
          <span>年代:</span>
          <a href="" id="ahover">全部</a>
          <!-- 年代循环 -->
          <?php for ($i=2016; $i > 2005 ; $i--) { ?>  
          <a href="">{$i}</a>
          <?php } ?>
        </li>

        <li id="order">
          <span>级别:</span>
          <a href="" name="grade">按评分</a>
          <a href="" name="hot">按热度</a>
          <a href="" id="ahover" name="update_time">按更新</a>
        </li>

      </ul>
    </div>


    <div class="movielist">
      <div class="pagepre">
        <p>
          共找到
          <span></span>
          个视频
        </p>
      </div>

    
<style>
  .info a{
     display:block; width:130px;float:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; 
  }
  .info em{
      float:left;
  }

</style>



      <!-- 循环视频 -->
      <ul class="mlist" id="splist">
        <!-- 内容由ajax拼接 -->
 
          <!-- end循环视频 -->
  
          <div class="cr">
          </div>
      </ul>




          <!-- end过滤 -->
 
<style>

  #curr .current{
    border: 1px solid #0196DA;
    background: #0196DA;
    color: #fff;
  }
</style>

          <!-- 引入分页 -->
          <div id="pages">
          </div>
          <!-- end分页 -->

        </div>     
      </div>
    </div>
<!-- end main -->

      <script>
      //筛选按钮摁下样式设置
      function setastyle(){
        $(this).siblings().attr('id','');
        this.id = 'ahover';        
        artscreen();
        return false;
      }
      //分页点击(){
      function setpage(){
        var page = this.innerHTML;
        var sum = parseInt($('.current').html());
        if(!isNaN(page)){
          artscreen(page);
        }else if(page == '&gt;&gt;'){     
          artscreen(sum+1);
        }else{
          artscreen(sum-1);
        }
        return false;   
      }

      //筛选获取数据
      function artscreen(page=1){  
        var aall = $('.filter #ahover');  
        var cat = "<?php echo I('cat'); ?>"
        var post = 'cat_id='+cat+'&type='+aall[1].innerHTML+'&region='+aall[2].innerHTML+'&year='+aall[3].innerHTML+'&order='+aall[4].name+'&page='+page;
        var url = '/index.php/home/cat/getArt/p/'+page;
        var json = ajax('post',url,post,false,false);
        var data =(new Function("","return "+json))();
        var artall = data['artall'];
        var inner = '';
        for (var i = 0; i < artall.length; i++) {

          inner += '<li><a href="/index.php/sp/id/'+artall[i]['art_id']+'.html" target="_blank" class="p">';
          inner += '<img src="'+artall[i]['img']+'"/></a>';

          inner += '<div class="info">';
          inner += '<h2><a href="/index.php/sp/id/'+artall[i]['art_id']+'.html" target="_blank">'+artall[i]['title']+'</a><em>'+artall[i]['year']+'</em>'+'</h2>';
          inner += '<em class="star star'+Math.round(parseInt(artall[i]['grade'])/2)+'"></em>';
          inner += '<p style="clear:both">主演：'+artall[i]['actor']+'</p>';
          if (artall[i]['status'] == 1) {
            var status = '全集';
          }else{
            var status = '连载中';
          };
          inner += '<p><i>'+'状态：'+status+'</i><i>地区：'+artall[i]['region']+'</i></p>';
          inner += '<p>更新：'+getdate(artall[i]['update_time']*1000)+'</p>';

          inner += '<p><span><a href="/index.php/sp/id/'+artall[i]['art_id']+'.html#down" target="_blank">观看</a><a href="/index.php/sp/id/'+artall[i]['art_id']+'.html" target="_blank">下载</a></span></p></div></li>';
        };
        //文章
        $('#splist').html(inner);
        //文章数
        $('.pagepre span').html(data['sum']);
        //分页
        $('#pages').html(data['page']);
        $('.current').parent().attr('id','curr'); 
        //因为分页内容刷新 需重新绑定事件
        $('#curr a').click(setpage);  
      }
      //筛选绑定点击事件
      $('#type a,#region a,#year a,#order a').click(setastyle);
      artscreen();

      //分页绑定点击事件
      $('#curr a').click(setpage);
      </script>


  

    <!-- 引入底部 -->
    <?php require('./public/footer.html') ?>
    <!-- end底部 -->

  </body>
</html>